<?php $this->layout('layout')?>
<?php $this->start('main')?>

<h2>今日总览</h2>

<div class="form-row">
<div class="col-lg-6">
<form method="GET" action="/stats/todaylast">
<div class="form-inline">

<div class="input-group">
<select onchange="onChangePro( this.value, '#filterTags', '版本' );" name="pro" class="form-control">
<option value="0">项目</option>
<?php $this->insert('selection-users', ['data' => $pros, 'slt' => isset($pro_slt) ? $pro_slt : 0])?>
</select>
</div>

<div class="input-group ml-2">
<select name="tag" class="form-control" id="filterTags">
<option value="0">版本</option>
<?php $this->insert('selection-users', ['data' => $tags, 'slt' => isset($tag_slt) ? $tag_slt : 0])?>
</select>
<div class="input-group-append">
</div>
</div>

<div class="input-group ml-2 mr-2">
<div class="input-group-prepend">
<span class="input-group-text">截止日期</span>
</div>
<input value="<?=(isset($today) ? $today : date('Y-m-d', time() + 86400 * 30))?>" name="today" class="form-control" type="date">
</div>


<button class="btn btn-primary" type="submit">根据版本查询</button>


</div>
</form>

</div>
</div>


<?php $this->insert('stats-content')?>

<?php $this->end()?>

<?php $this->start('script')?>
<script type="text/javascript">
var tags = <?=json_encode($tags)?>;
</script>
<?php $this->end()?>
